package com.zbec.mdrs.web;

import com.zbec.framework.core.vo.JqgridResponse;
import com.zbec.framework.core.vo.PageInfo;
import com.zbec.mdrs.service.LogsService;
import com.zbec.mdrs.vo.LogsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by fxl on 2015/11/9.
 */
@Controller
@RequestMapping(value = "/businessLog")
public class LogsController {

    @Autowired
    private LogsService logsService;

    @RequestMapping(value = "/toBusinessLog")
    public String toBusinessLog(HttpServletRequest request) {
        return "system/businessLog";
    }

    @RequestMapping(value = "/businessLogList")
    @ResponseBody
    public JqgridResponse<LogsVo> businessLogList(LogsVo vo,PageInfo pageInfo,HttpServletRequest request) {
        JqgridResponse<LogsVo> logsVoJqgridResponse=logsService.findAllLogs(vo,pageInfo);
        return logsVoJqgridResponse;
    }
}
